//
//  RootNavigationViewController.m
//  DMT_VR
//
//  Created by xin on 16/10/20.
//  Copyright © 2016年 Elephant-Parade. All rights reserved.
//

#import "RootNavigationViewController.h"

@interface RootNavigationViewController ()

@end

@implementation RootNavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
#pragma mark - 屏幕方向

- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return self.topMostViewController.supportedInterfaceOrientations;
}
- (BOOL)shouldAutorotate{
    return [self.topMostViewController shouldAutorotate];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
    return [self.topMostViewController preferredInterfaceOrientationForPresentation];
}
- (UIViewController*)topMostViewController{
    return self.topViewController;
    //找到当前正在显示的viewController并返回.
}

@end
